import request from '@/utils/request'

// 查询实时数据列表
export function listRealtime(query) {
  return request({
    url: '/mes/realtime/list',
    method: 'get',
    params: query
  })
}

// 查询实时数据详细
export function getRealtime(mid) {
  return request({
    url: '/mes/realtime/' + mid,
    method: 'get'
  })
}

// 新增实时数据
export function addRealtime(data) {
  return request({
    url: '/mes/realtime',
    method: 'post',
    data: data
  })
}

// 修改实时数据
export function updateRealtime(data) {
  return request({
    url: '/mes/realtime',
    method: 'put',
    data: data
  })
}

// 删除实时数据
export function delRealtime(mid) {
  return request({
    url: '/mes/realtime/' + mid,
    method: 'delete'
  })
}

// 导出实时数据
export function exportRealtime(query) {
  return request({
    url: '/mes/realtime/export',
    method: 'get',
    params: query
  })
}